package com.example.springbootexamples.controller;

import com.example.springbootexamples.domain.TTestTable;
import com.example.springbootexamples.service.TTestTableService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TTestTableController {

    private Logger logger= LoggerFactory.getLogger(this.getClass());

    @Autowired
    private TTestTableService tTestTableService;

    @RequestMapping("tTestTable/selectById")
    public TTestTable selectById(Integer id12) {
        return tTestTableService.selectById(id12);
    }

    @RequestMapping("tTestTable/selectList")
    public List<TTestTable> selectList(TTestTable tTestTable) {
        return tTestTableService.selectList(tTestTable);
    }

    @RequestMapping(value = "tTestTable/insert",method = RequestMethod.POST)
    public int insert(TTestTable tTestTable) {
        return tTestTableService.insert(tTestTable);
    }

    @RequestMapping(value = "tTestTable/insertList",method = RequestMethod.POST)
    public int insertList(List<TTestTable> list) {
        return tTestTableService.insertList(list);
    }

    @RequestMapping(value = "tTestTable/update",method = RequestMethod.POST)
    public int update(TTestTable tTestTable) {
        return tTestTableService.update(tTestTable);
    }

    @RequestMapping(value = "tTestTable/deleteById",method = RequestMethod.POST)
    public int deleteById(Integer id12) {
        return tTestTableService.deleteById(id12);
    }

    @RequestMapping(value = "tTestTable/deleteByIds",method = RequestMethod.POST)
    public int deleteByIds(String[] ids) {
        return tTestTableService.deleteByIds(ids);
    }


}
